/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.home.logic;

import com.home.dao.AgentDao;
import com.home.mapping.Agent;
import java.util.List;

/**
 *
 * @author pnduy
 */
public class AgentLogic {
    public Agent findAgentById(Integer id) {
        Agent agent = new Agent();
        agent = (Agent) new AgentDao().findByPk(Agent.class, id);
        return agent;
    }
    
    public List<Agent> findAllAgent() {
        return new AgentDao().findAll(Agent.class);
    }
    
    public List<Agent> findAgentsByVenture(Integer idVenture) {
        return new AgentDao().findAgentByVenture(idVenture);
    }
    
    public List<Agent> findAgentsByRole(int role) {
        return new AgentDao().findAgentsByRole(role);
    }
    
    public List<Agent> findQAByVenture(int venture) {
        return new AgentDao().findQAByVenture(venture);
    }
    
    public List<Agent> findAllQA() {
        return new AgentDao().findAllQA();
    }
    
    public List<Agent> findTeamLeadByVenture(int venture) {
        return new AgentDao().findTeamLeadByVenture(venture);
    }
}
